<?php /*a:2:{s:68:"/www/wwwroot/jj.xueao400.com/application/jujin/view/member/form.html";i:1541741828;s:71:"/www/wwwroot/jj.xueao400.com/application/admin/view/public/content.html";i:1531908558;}*/ ?>
<!-- 右则内容区域 开始 -->

<div class="layui-card">
    <!--<?php if(!(empty($title) || (($title instanceof \think\Collection || $title instanceof \think\Paginator ) && $title->isEmpty()))): ?>-->
    <div class="layui-header notselect">
        <div class="pull-left"><span><?php echo htmlentities($title); ?></span></div>
        <div class="pull-right margin-right-15 nowrap"></div>
    </div>
    <!--<?php endif; ?>-->
    <div class="layui-card-body">
<form autocomplete="off" onsubmit="return false;" action="<?php echo request()->url(); ?>" data-auto="true" method="post" class='form-horizontal layui-form padding-top-20'>

    <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
        <ul class="layui-tab-title">
            <li class="layui-this">基本信息</li>
            <?php if($vo['type'] == USER_TYPE_WORKER): ?>
                <li>工人邦信息</li>
            <?php endif; if($vo['type'] == USER_TYPE_SUPPLIER): ?>
                <li>供应商信息</li>
            <?php endif; ?>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <div class="form-group">
                    <label class="col-sm-2 control-label">手机号</label>
                    <div class='col-sm-8'>
                        <input autofocus name="phone" value='<?php echo htmlentities((isset($vo['phone']) && ($vo['phone'] !== '')?$vo['phone']:"")); ?>' required="required" title="请输入手机号" placeholder="请输入手机号" class="layui-input">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">昵称</label>
                    <div class='col-sm-8'>
                        <input name="nickname" value='<?php echo htmlentities((isset($vo['nickname']) && ($vo['nickname'] !== '')?$vo['nickname']:"")); ?>' required="required" title="请输入昵称" placeholder="请输入昵称" class="layui-input">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">标签</label>
                    <div class='col-sm-8'>
                        <?php $flag_arr = FLAG_ARR; foreach($flag_arr as $flag_key=>$flag): ?>
                        <label class="think-checkbox"><input lay-ignore class="list-check-box" type="checkbox" <?php if(in_array(($flag_key), is_array((isset($vo['flag']) && ($vo['flag'] !== '')?$vo['flag']:''))?(isset($vo['flag']) && ($vo['flag'] !== '')?$vo['flag']:''):explode(',',(isset($vo['flag']) && ($vo['flag'] !== '')?$vo['flag']:'')))): ?>checked<?php endif; ?> value="<?php echo htmlentities($flag_key); ?>" name="flag[]"/> <?php echo htmlentities($flag); ?></label>
                        <?php endforeach; ?>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">性别</label>
                    <div class='col-sm-8'>
                        <label class="think-radio"><input lay-ignore type="radio" <?php echo $vo['sex']=='男' ? 'checked' : ''; ?> value="男" name="sex"/> 男</label>
                        <label class="think-radio"><input lay-ignore type="radio" <?php echo $vo['sex']=='女' ? 'checked' : ''; ?> value="女" name="sex"/> 女</label>
                    </div>
                </div>

                <!--<div class="form-group">-->
                    <!--<label class="col-sm-2 control-label">位置</label>-->
                    <!--<div class='col-sm-2'>-->
                        <!--<select name="province">-->
                            <!--<option value="0">请选择</option>-->
                        <!--</select>-->
                    <!--</div>-->
                    <!--<div class='col-sm-2'>-->
                        <!--<select name="province">-->
                            <!--<option value="0">请选择</option>-->
                        <!--</select>-->
                    <!--</div>-->
                    <!--<div class='col-sm-2'>-->
                        <!--<select name="province">-->
                            <!--<option value="0">请选择</option>-->
                        <!--</select>-->
                    <!--</div>-->
                <!--</div>-->

                <!--<div class="form-group">-->
                    <!--<label class="col-sm-2 control-label">详细地址</label>-->
                    <!--<div class='col-sm-8'>-->
                        <!--<input value="<?php echo htmlentities((isset($vo['address']) && ($vo['address'] !== '')?$vo['address']:'')); ?>" class="layui-input">-->
                    <!--</div>-->
                <!--</div>-->

                <div class="form-group">
                    <label class="col-sm-2 control-label">排序</label>
                    <div class='col-sm-8'>
                        <input name="sort" value='<?php echo htmlentities((isset($vo['sort']) && ($vo['sort'] !== '')?$vo['sort']:"0")); ?>' required="required" title="请输入排序值" placeholder="请输入排序值" class="layui-input">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label label-required">会员头像</label>
                    <div class='col-sm-8'>
                        <table class="layui-table background-item margin-none" lay-size="sm" lay-skin="nob">
                            <thead>
                            <tr>
                                <td>会员头像</td>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td class="text-top" style="width:100px">
                                    <input type="hidden" name="headimg" value="<?php echo htmlentities((isset($vo['headimg']) && ($vo['headimg'] !== '')?$vo['headimg']:'')); ?>">
                                    <script>$('[name=headimg]').uploadOneImage()</script>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <div class="layui-tab-item">
                <!--工人邦信息-->
                <?php if($vo['type'] == USER_TYPE_WORKER): ?>

                <div class="form-group">
                    <label class="col-sm-2 control-label">姓名</label>
                    <div class='col-sm-8'>
                        <input name="name" value='<?php echo htmlentities((isset($vo['worker_info']['name']) && ($vo['worker_info']['name'] !== '')?$vo['worker_info']['name']:"")); ?>' required="required" title="请输入姓名" placeholder="请输入姓名" class="layui-input">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">工种</label>
                    <div class='col-sm-8'>
                        <label class="layui-input no_border">
                            <?php if(is_array($vo['worker_info']['work_type_arr']) || $vo['worker_info']['work_type_arr'] instanceof \think\Collection || $vo['worker_info']['work_type_arr'] instanceof \think\Paginator): $i = 0; $__LIST__ = $vo['worker_info']['work_type_arr'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$work_type): $mod = ($i % 2 );++$i;?>
                            <span class="layui-badge layui-bg-blue"><?php echo htmlentities(getmodel($work_type,'my_cate','title')); ?></span>
                            <?php endforeach; endif; else: echo "" ;endif; ?>
                        </label>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">技能</label>
                    <div class='col-sm-8'>
                        <label class="layui-input no_border">
                            <?php if(is_array($vo['worker_info']['skill_arr']) || $vo['worker_info']['skill_arr'] instanceof \think\Collection || $vo['worker_info']['skill_arr'] instanceof \think\Paginator): $i = 0; $__LIST__ = $vo['worker_info']['skill_arr'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$skill): $mod = ($i % 2 );++$i;?>
                            <span class="layui-badge layui-bg-blue"><?php echo htmlentities(getmodel($skill,'my_cate','title')); ?></span>
                            <?php endforeach; endif; else: echo "" ;endif; ?>
                        </label>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">生日</label>
                    <div class='col-sm-8'>
                        <input name="birthday" value='<?php echo htmlentities(date('Y-m-d',!is_numeric((isset($vo['worker_info']['birthday']) && ($vo['worker_info']['birthday'] !== '')?$vo['worker_info']['birthday']:""))? strtotime((isset($vo['worker_info']['birthday']) && ($vo['worker_info']['birthday'] !== '')?$vo['worker_info']['birthday']:"")) : (isset($vo['worker_info']['birthday']) && ($vo['worker_info']['birthday'] !== '')?$vo['worker_info']['birthday']:""))); ?>' required="required" title="请选择生日" placeholder="请选择生日" class="layui-input">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">个人擅长</label>
                    <div class='col-sm-8'>
                        <input name="good_at" value='<?php echo htmlentities((isset($vo['worker_info']['good_at']) && ($vo['worker_info']['good_at'] !== '')?$vo['worker_info']['good_at']:"")); ?>' required="required" title="请输入个人擅长" placeholder="请输入个人擅长" class="layui-input">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">过期时间</label>
                    <div class='col-sm-8'>
                        <input name="expiry_time" value="<?php echo htmlentities(date('Y-m-d H:i:s',!is_numeric((isset($vo['worker_info']['expiry_time']) && ($vo['worker_info']['expiry_time'] !== '')?$vo['worker_info']['expiry_time']:''))? strtotime((isset($vo['worker_info']['expiry_time']) && ($vo['worker_info']['expiry_time'] !== '')?$vo['worker_info']['expiry_time']:'')) : (isset($vo['worker_info']['expiry_time']) && ($vo['worker_info']['expiry_time'] !== '')?$vo['worker_info']['expiry_time']:''))); ?>" required="required" title="请选择过期时间" placeholder="请选择过期时间" class="layui-input">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">入驻等级</label>
                    <div class='col-sm-8'>
                        <select required class="layui-select full-width" name="grade_id">
                            <?php foreach($store_member_grade as $grade): ?>
                            <option <?php if((isset($grade['id']) && ($grade['id'] !== '')?$grade['id']:'') == (isset($vo['worker_info']['grade_id']) && ($vo['worker_info']['grade_id'] !== '')?$vo['worker_info']['grade_id']:0)): ?>selected<?php endif; ?> value="<?php echo htmlentities($grade['id']); ?>"><?php echo htmlentities($grade['name']); ?></option>
                            <?php endforeach; ?>
                        </select>
                    </div>
                </div>
                <?php endif; ?>
                <!--供应商信息-->
                <?php if($vo['type'] == USER_TYPE_SUPPLIER): ?>

                <div class="form-group">
                    <label class="col-sm-2 control-label">供应商名称</label>
                    <div class='col-sm-8'>
                        <input name="name" value='<?php echo htmlentities((isset($vo['supplier_info']['name']) && ($vo['supplier_info']['name'] !== '')?$vo['supplier_info']['name']:"")); ?>' required="required" title="请输入供应商名称" placeholder="请输入供应商名称" class="layui-input">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">座机号</label>
                    <div class='col-sm-8'>
                        <input name="tel" value='<?php echo htmlentities((isset($vo['supplier_info']['tel']) && ($vo['supplier_info']['tel'] !== '')?$vo['supplier_info']['tel']:"")); ?>' required="required" title="请输入座机号" placeholder="请输入座机号" class="layui-input">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">企业概况</label>
                    <div class='col-sm-8'>
                        <textarea class="layui-textarea" name="intro" placeholder="请输入企业概况"><?php echo htmlentities((isset($vo['supplier_info']['intro']) && ($vo['supplier_info']['intro'] !== '')?$vo['supplier_info']['intro']:'')); ?></textarea>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">从事行业</label>
                    <div class='col-sm-8'>
                        <label class="layui-input no_border">
                            <?php if(is_array($vo['supplier_info']['supplier_type_arr']) || $vo['supplier_info']['supplier_type_arr'] instanceof \think\Collection || $vo['supplier_info']['supplier_type_arr'] instanceof \think\Paginator): $i = 0; $__LIST__ = $vo['supplier_info']['supplier_type_arr'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$supplier_type): $mod = ($i % 2 );++$i;?>
                            <span class="layui-badge layui-bg-blue"><?php echo htmlentities(getmodel($supplier_type,'my_cate','title')); ?></span>
                            <?php endforeach; endif; else: echo "" ;endif; ?>
                        </label>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">主营范围</label>
                    <div class='col-sm-8'>
                        <label class="layui-input no_border">
                            <?php if(is_array($vo['supplier_info']['main_arr']) || $vo['supplier_info']['main_arr'] instanceof \think\Collection || $vo['supplier_info']['main_arr'] instanceof \think\Paginator): $i = 0; $__LIST__ = $vo['supplier_info']['main_arr'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$main): $mod = ($i % 2 );++$i;?>
                            <span class="layui-badge layui-bg-blue"><?php echo htmlentities(getmodel($main,'my_cate','title')); ?></span>
                            <?php endforeach; endif; else: echo "" ;endif; ?>
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label label-required">简介图片</label>
                    <div class='col-sm-8'>
                        <table class="layui-table background-item margin-none" lay-size="sm" lay-skin="nob">
                            <thead>
                            <tr>
                                <td>图片</td>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td class="text-top">
                                    <input type="hidden" name="images" value="<?php echo htmlentities((isset($vo['images']) && ($vo['images'] !== '')?$vo['images']:'')); ?>">
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                <script>
                    $('input[name="images"]').uploadMultipleImage();
                </script>
                <!--<div class="form-group">
                    <label class="col-sm-2 control-label label-required">经典案例</label>
                    <div class='col-sm-8'>
                        <table class="layui-table background-item margin-none" lay-size="sm" lay-skin="nob">
                            <thead>
                            <tr>
                                <td>案例图片</td>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td class="text-top">
                                    <input type="hidden" name="case" value="<?php echo htmlentities((isset($vo['supplier_info']['case']) && ($vo['supplier_info']['case'] !== '')?$vo['supplier_info']['case']:'')); ?>">
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
                <script>
                    $('input[name="case"]').uploadMultipleImage();
                </script>-->

                <div class="form-group">
                    <label class="col-sm-2 control-label">过期时间</label>
                    <div class='col-sm-8'>
                        <input name="expiry_time" value="<?php echo htmlentities(date('Y-m-d H:i:s',!is_numeric($vo['supplier_info']['expiry_time'])? strtotime($vo['supplier_info']['expiry_time']) : $vo['supplier_info']['expiry_time'])); ?>" required="required" title="请选择过期时间" placeholder="请选择过期时间" class="layui-input">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">入驻等级</label>
                    <div class='col-sm-8'>
                        <select required class="layui-select full-width" name="grade_id">
                            <?php foreach($store_member_grade as $grade): ?>
                            <option <?php if($grade['id'] == (isset($vo['supplier_info']['grade_id']) && ($vo['supplier_info']['grade_id'] !== '')?$vo['supplier_info']['grade_id']:0)): ?>selected<?php endif; ?> value="<?php echo htmlentities($grade['id']); ?>"><?php echo htmlentities($grade['name']); ?></option>
                            <?php endforeach; ?>
                        </select>
                    </div>
                </div>
                <?php endif; ?>
            </div>
        </div>
    </div>

    <div class="hr-line-dashed"></div>

    <div class="col-sm-7 col-sm-offset-2">
        <div class="layui-form-item text-center">
            <?php if(!empty($vo['id'])): ?>
            <input type="hidden" name="id" value="<?php echo htmlentities($vo['id']); ?>">
            <input type="hidden" name="type" value="<?php echo htmlentities($vo['type']); ?>">
            <?php endif; ?>
            <button class="layui-btn" type="submit">保存</button>
            <button class="layui-btn layui-btn-danger" type='button' onclick="window.history.back()">取消</button>
        </div>
    </div>

    <style>
        .background-item {
            padding: 15px;
            background: #efefef;
        }
        .no_border{border:none;}
        .background-item thead tr {
            background: #e0e0e0
        }
    </style>
    <script>
        window.form.render();
        layui.use('laydate', function(){
            var laydate = layui.laydate;

            laydate.render({
                elem: 'input[name=birthday]',
                btns: ['now', 'confirm']
            });
            laydate.render({
                elem: 'input[name=expiry_time]',
                type: 'datetime',
                btns: ['now', 'confirm']
            });
        });
    </script>
</form>
</div>
</div>

<!-- 右则内容区域 结束 -->